Copy page

Copy page as Markdown for LLMs

View as Markdown

View this page as plain text


Open in ChatGPT

Ask ChatGPT about this page

Open in Claude

Ask Claude about this page

Divine Magic Reading

Introducing the Divine Magic Reading API, a mystical gateway that delivers spiritual insights and enlightenment through divine magic card readings. Easily integrate this API into your applications or websites to provide users with personalized, spiritually guided experiences that inspire and empower.


Step by Step Divine Magic Reading API Postman Testing Integration

https://support.divineapi.com/2-card-tarot-apis/testing-the-divine-magic-reading-tarot-api-using-postman


API Endpoint for English

POST https://astroapi-5.divineapi.com/api/v2/divine-magic-reading

Guide: If you only need English, use this endpoint.


API Endpoint for other languages

POST https://astroapi-5-translator.divineapi.com/api/v2/divine-magic-reading

Guide: If you want the response in any other language use this translator endpoint.


Supported Language Codes

Use the lan field in the request body to specify the desired response language.

Supported Reference Article:
https://support.divineapi.com/general-api-support/translating-apis-into-a-different-language

CodeLanguage
enEnglish
hiHindi
zhChinese
jaJapanese
arArabic
ruRussian
ptPortuguese
esSpanish
frFrench
deGerman
itItalian
nlDutch
plPolish
trTurkish
ukUkrainian
huHungarian
grGreek
bnBengali
maMarathi
tmTamil
tlTelugu
mlMalayalam
knKannada
taFilipino/Tagalog
bahIndonesian

Guide: Ensure that your translator configuration is up to date via DivineAPI Translator.


Headers

NameTypeDescription
Authorization*StringYour API Access Token. Example: Bearer {token}

Request Body

NameTypeDescription
api_key*StringYour DivineAPI key available on your dashboard.
card_imageIntegerSpecify which card image to retrieve — 1, 2, or 3. Default is 1.
lanStringLanguage code as per the table above. Default is en.

200: OK Successful

{
    "success": 1,
    "data": {
        "prediction": {
            "card1": "THE MAGICIAN",
            "card2": "THE EMPRESS",
            "card1_image": "https://divineapi.com/admin/uploads/tarot-white-magic/2.jpg",
            "card2_image": "https://divineapi.com/admin/uploads/tarot-white-magic/4.jpg",
            "cause": "To regain your balance, you can start by identifying which element has become dominant. Is it the grounded and practical side, or the dreamy and aspirational side? Once you've figured that out, you can focus on bringing the other element back into balance. For example, if you've been too focused on the practical aspects of your goals, you can try to tap into your intuition and imagination to come up with more creative solutions. If you've been too focused on the big picture, you can break your goals down into smaller, more manageable steps. Remember that you have the power to make your dreams a reality, but it takes a balance of both practical and imaginative energies to do so. The Magician card is reminding you of that, and urging you to find that balance.",
            "remedy": "The Empress card is a symbol of fertility, creativity, and nurturing. If you've drawn this card, it's likely that you're feeling called to explore your artistic side. This card encourages you to embrace your creative impulses, to let your imagination run wild, and to connect with the world around you in a deeper, more meaningful way. Through creativity, you can manifest your desires, bring your dreams to life, and connect with the divine feminine energy that flows through all things.\r\n\r\nIf you're feeling stuck or uninspired, it can be helpful to engage in a creative ritual to help you tap into your creative potential. The Empress suggests using any artistic medium, such as painting, drawing, or even writing, and allowing yourself to be guided by your intuition. You might consider creating your art in a natural setting, such as a park or a garden, to connect with the energy of the earth and to be inspired by the beauty of nature.\r\n\r\nRemember that creativity is not about perfection or talent. It's about expressing yourself authentically and tapping into the infinite creative potential that resides within you. Trust that whatever you create is a reflection of your unique spirit, and allow yourself to be guided by the divine feminine energy of the Empress card. With her loving guidance, you can unleash your creativity and manifest your deepest desires."
        }
    }
}

Example Code Implementations

Below are example implementations in various programming environments.


cURL

curl --location 'https://astroapi-5.divineapi.com/api/v2/divine-magic-reading' \
--header 'Authorization: Bearer {Your Auth Token}' \
--form 'api_key="Your API Key"' \
--form 'card_image="1"' \
--form 'lan="en"'

NodeJS

var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://astroapi-5.divineapi.com/api/v2/divine-magic-reading',
  'headers': {
    'Authorization': 'Bearer {Your Auth Token}'
  },
  formData: {
    'api_key': 'Your API key',
    'card_image': '1',
    'lan': 'en'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

JavaScript jQuery AJAX

var form = new FormData();
form.append("api_key", "Your API key");
form.append("card_image", "1");
form.append("lan", "en");

var settings = {
  "url": "https://astroapi-5.divineapi.com/api/v2/divine-magic-reading",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Authorization": "Bearer {Your Auth Token}"
  },
  "processData": false,
  "mimeType": "multipart/form-data",
  "contentType": false,
  "data": form
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Python

import requests

url = "https://astroapi-5.divineapi.com/api/v2/divine-magic-reading"

payload = {'api_key': 'Your API key',
'card_image': '1',
'lan': 'en'}
headers = {
  'Authorization': 'Bearer {Your Auth Token}'
}

response = requests.request("POST", url, headers=headers, data=payload,)

print(response.text)
curl -X POST "https://astroapi-5.divineapi.com/api/v2/divine-magic-reading" \
  -H "Authorization: Bearer {Your Auth Token}" \
  --form 'api_key="{Your API Key}"' \
  --form 'card_image="1"' \
  --form 'lan="en"'
const FormData = require('form-data');
const axios = require('axios');

const form = new FormData();
form.append('api_key', '{Your API Key}');
form.append('card_image', '1');
form.append('lan', 'en');

const response = await axios.post('https://astroapi-5.divineapi.com/api/v2/divine-magic-reading', form, {
  headers: {
    ...form.getHeaders(),
    'Authorization': 'Bearer {Your Auth Token}',
  }
});

console.log(response.data);
import requests

url = "https://astroapi-5.divineapi.com/api/v2/divine-magic-reading"
headers = {
    "Authorization": "Bearer {Your Auth Token}",
}
payload = {
    "api_key": "{Your API Key}",
    "card_image": "1",
    "lan": "en",
}

response = requests.post(url, headers=headers, data=payload)

print(response.json())
const formData = new FormData();
formData.append('api_key', '{Your API Key}');
formData.append('card_image', '1');
formData.append('lan', 'en');

const response = await fetch('https://astroapi-5.divineapi.com/api/v2/divine-magic-reading', {
  method: 'POST',
  headers: {
      'Authorization': "Bearer {Your Auth Token}",
    },
  body: formData,
});

const data = await response.json();
console.log(data);
<?php

use GuzzleHttp\Client;

$client = new Client();

$response = $client->request('POST', 'https://astroapi-5.divineapi.com/api/v2/divine-magic-reading', [
    'headers' => [
        'Authorization' => 'Bearer {Your Auth Token}',
    ],
    'multipart' => [
        ['name' => 'api_key', 'contents' => '{Your API Key}'],
        ['name' => 'card_image', 'contents' => '1'],
        ['name' => 'lan', 'contents' => 'en'],
    ],
]);

echo $response->getBody();
package main

import (
    "bytes"
    "fmt"
    "mime/multipart"
    "net/http"
    "io"
)

func main() {
    body := &bytes.Buffer{}
    writer := multipart.NewWriter(body)
    writer.WriteField("api_key", "{Your API Key}")
    writer.WriteField("card_image", "1")
    writer.WriteField("lan", "en")
    writer.Close()

    req, _ := http.NewRequest("POST", "https://astroapi-5.divineapi.com/api/v2/divine-magic-reading", body)
    req.Header.Set("Content-Type", writer.FormDataContentType())
    req.Header.Set("Authorization", "Bearer {Your Auth Token}")

    client := &http.Client{}
    resp, _ := client.Do(req)
    defer resp.Body.Close()

    body2, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body2))
}
import okhttp3.*;
import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        OkHttpClient client = new OkHttpClient();

        RequestBody body = new MultipartBody.Builder()
            .setType(MultipartBody.FORM)
            .addFormDataPart("api_key", "{Your API Key}")
            .addFormDataPart("card_image", "1")
            .addFormDataPart("lan", "en")
            .build();

        Request request = new Request.Builder()
            .url("https://astroapi-5.divineapi.com/api/v2/divine-magic-reading")
            .post(body)
            .addHeader("Authorization", "Bearer {Your Auth Token}")
            .build();

        Response response = client.newCall(request).execute();
        System.out.println(response.body().string());
    }
}
import Foundation

let url = URL(string: "https://astroapi-5.divineapi.com/api/v2/divine-magic-reading")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer {Your Auth Token}", forHTTPHeaderField: "Authorization")

let boundary = "Boundary-\(UUID().uuidString)"
request.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type")

var bodyData = Data()
bodyData.append("--\(boundary)\r\n".data(using: .utf8)!)
bodyData.append("Content-Disposition: form-data; name=\"api_key\"\r\n\r\n".data(using: .utf8)!)
bodyData.append("{Your API Key}\r\n".data(using: .utf8)!)
bodyData.append("--\(boundary)\r\n".data(using: .utf8)!)
bodyData.append("Content-Disposition: form-data; name=\"card_image\"\r\n\r\n".data(using: .utf8)!)
bodyData.append("1\r\n".data(using: .utf8)!)
bodyData.append("--\(boundary)\r\n".data(using: .utf8)!)
bodyData.append("Content-Disposition: form-data; name=\"lan\"\r\n\r\n".data(using: .utf8)!)
bodyData.append("en\r\n".data(using: .utf8)!)
bodyData.append("--\(boundary)--\r\n".data(using: .utf8)!)
request.httpBody = bodyData

let task = URLSession.shared.dataTask(with: request) { data, response, error in
    if let data = data {
        print(String(data: data, encoding: .utf8) ?? "")
    }
}
task.resume()
import okhttp3.*

fun main() {
    val client = OkHttpClient()

    val body = MultipartBody.Builder()
        .setType(MultipartBody.FORM)
        .addFormDataPart("api_key", "{Your API Key}")
        .addFormDataPart("card_image", "1")
        .addFormDataPart("lan", "en")
        .build()

    val request = Request.Builder()
        .url("https://astroapi-5.divineapi.com/api/v2/divine-magic-reading")
        .post(body!!)
        .addHeader("Authorization", "Bearer {Your Auth Token}")
        .build()

    client.newCall(request).execute().use { response ->
        println(response.body?.string())
    }
}
using System;
using System.Net.Http;
using System.Threading.Tasks;

class Program {
    static async Task Main() {
        using var client = new HttpClient();
        client.DefaultRequestHeaders.Add("Authorization", "Bearer {Your Auth Token}");

        var content = new MultipartFormDataContent();
        content.Add(new StringContent("{Your API Key}"), "api_key");
        content.Add(new StringContent("1"), "card_image");
        content.Add(new StringContent("en"), "lan");

        var response = await client.PostAsync("https://astroapi-5.divineapi.com/api/v2/divine-magic-reading", content);
        var result = await response.Content.ReadAsStringAsync();
        Console.WriteLine(result);
    }
}
Response 200
{
    "success": 1,
    "data": {
        "prediction": {
            "card1": "THE HANGED MAN",
            "card2": "THE LOVERS",
            "card1_image": "https://divineapi.com/admin/uploads/tarot-white-magic/13.jpg",
            "card2_image": "https://divineapi.com/admin/uploads/tarot-white-magic/7.jpg",
            "cause": "You might be feeling overwhelmed by the choices in front of you if you have drawn the card that represents Indecision. It's natural to want to consider all of your options and not rush into making a decision. However, sometimes it's important to make a choice and move forward. You may feel like your life is at a standstill until you do so.\r\n\r\nTake the time to carefully weigh your options and consider the potential outcomes. But don't let yourself get stuck in analysis paralysis. Trust that you have the ability to make the right decision for yourself, even if it's not perfect. Remember that sometimes taking action is better than no action at all.\r\n\r\nIf you're still struggling to make a decision, try writing down the pros and cons of each option or seeking advice from someone you trust. But ultimately, the decision is yours to make. Have confidence in yourself and trust that you will find success and fulfillment no matter what path you choose.",
            "remedy": "If you find yourself facing conflict or tension in an important partnership, the Lovers card can provide you with guidance and insight. While the card is often associated with romantic love, it can also represent the bonds we share with our friends, family, and colleagues.\r\n\r\nIf you truly care about the relationship and want to mend any fractures that may have arisen, it's important to take action. One way to do this is by using the magical properties of rosemary. Rosemary is known for its ability to bring clarity and relieve stress, making it the perfect herb to use when dealing with relationship issues.\r\n\r\nTo harness the power of rosemary, print an image of the person with whom you're experiencing conflict, and wrap it with rosemary sprigs. This simple ritual can help to clear any negative energy surrounding the relationship and provide you with a fresh perspective.\r\n\r\nRemember that caring for a relationship takes effort, and it's important to nurture the bonds we share with those around us. Whether it's through open communication, spending quality time together, or using magical tools like rosemary, taking proactive steps towards healing the relationship can bring positive change and strengthen the connection.\r\n\r\nUltimately, the Lovers card is a reminder that our relationships with others are valuable and worth investing in. By approaching them with care, empathy, and a willingness to work through any challenges that arise, we can cultivate deep and meaningful connections that enrich our lives."
        }
    }
}