Predict API
Predict API will help you to get tarot interpretations and numerology meanings.
API Endpoints Reference
predict_tarot_interpretations async
| Method | Path | Description |
|---|---|---|
POST | /predict/tarot-interpretations | Get tarot interpretations |
| PARAMETER | DESCRIPTION |
|---|---|
request | The request object containing the name, question, past_card, present_card, and future_card. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
TarotAPIResponse | The response object containing the name, question, and interpretations. TYPE: |
Note
This function uses the TarotReader module to get the tarot interpretations.
Example Request
Example Response
{
"interpretations": [
{
"card_name": "Chariot (Reversed)",
"position": "past",
"orientation": "ureversed",
"meaning": "Past influence:...",
},
{
"card_name": "The Fool (Upright)",
"position": "present",
"orientation": "upright",
"meaning": "Present situation:...",
},
{
"card_name": "The Magician (Upright)",
"position": "future",
"orientation": "upright",
"meaning": "Future outlook:...",
},
],
"summary": "..."
}
Source code in api/index.py
predict_numerology_interpretations async
| Method | Path | Description |
|---|---|---|
POST | /predict/numerology-interpretations | Get numerology interpretations and meanings |
| PARAMETER | DESCRIPTION |
|---|---|
request | The request object containing the name, dob, and question. TYPE: |
| RETURNS | DESCRIPTION |
|---|---|
NumerologyAPIResponse | The response object containing the numerology meaning. TYPE: |
Note
This function uses the NumerologyReader module to get the numerology meaning.
Example Request
Source code in api/index.py
Models Reference
TarotAPIRequest pydantic-model
Show JSON schema:
{
"$defs": {
"TarotCard": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"is_upright": {
"title": "Is Upright",
"type": "boolean"
},
"image_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Image Url"
}
},
"required": [
"name",
"is_upright"
],
"title": "TarotCard",
"type": "object"
}
},
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"question": {
"title": "Question",
"type": "string"
},
"past_card": {
"$ref": "#/$defs/TarotCard"
},
"present_card": {
"$ref": "#/$defs/TarotCard"
},
"future_card": {
"$ref": "#/$defs/TarotCard"
}
},
"required": [
"name",
"question",
"past_card",
"present_card",
"future_card"
],
"title": "TarotAPIRequest",
"type": "object"
}
Fields:
-
name(str) -
question(str) -
past_card(TarotCard) -
present_card(TarotCard) -
future_card(TarotCard)
TarotAPIResponse pydantic-model
Show JSON schema:
{
"$defs": {
"TarotInterpretation": {
"properties": {
"card_name": {
"title": "Card Name",
"type": "string"
},
"position": {
"enum": [
"past",
"present",
"future"
],
"title": "Position",
"type": "string"
},
"orientation": {
"enum": [
"upright",
"reversed"
],
"title": "Orientation",
"type": "string"
},
"meaning": {
"title": "Meaning",
"type": "string"
}
},
"required": [
"card_name",
"position",
"orientation",
"meaning"
],
"title": "TarotInterpretation",
"type": "object"
}
},
"properties": {
"interpretations": {
"items": {
"$ref": "#/$defs/TarotInterpretation"
},
"title": "Interpretations",
"type": "array"
},
"summary": {
"title": "Summary",
"type": "string"
}
},
"required": [
"interpretations",
"summary"
],
"title": "TarotAPIResponse",
"type": "object"
}
Fields:
-
interpretations(List[TarotInterpretation]) -
summary(str)
TarotCard pydantic-model
Show JSON schema:
{
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"is_upright": {
"title": "Is Upright",
"type": "boolean"
},
"image_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Image Url"
}
},
"required": [
"name",
"is_upright"
],
"title": "TarotCard",
"type": "object"
}
Fields:
-
name(str) -
is_upright(bool) -
image_url(Optional[str])
TarotInterpretation pydantic-model
Show JSON schema:
{
"properties": {
"card_name": {
"title": "Card Name",
"type": "string"
},
"position": {
"enum": [
"past",
"present",
"future"
],
"title": "Position",
"type": "string"
},
"orientation": {
"enum": [
"upright",
"reversed"
],
"title": "Orientation",
"type": "string"
},
"meaning": {
"title": "Meaning",
"type": "string"
}
},
"required": [
"card_name",
"position",
"orientation",
"meaning"
],
"title": "TarotInterpretation",
"type": "object"
}
Fields:
-
card_name(str) -
position(Literal['past', 'present', 'future']) -
orientation(Literal['upright', 'reversed']) -
meaning(str)
NumerologyAPIRequest pydantic-model
Show JSON schema:
Fields:
-
name(str) -
dob(str) -
question(str)
Validators:
-
validate_dob_format→dob