Dify
Bind die Occult API in Dify-Workflows ein und bau KI-gestützte Astrologie-Anwendungen.
HTTP-Tool
Füg in Dify einen HTTP-Tool-Knoten hinzu. Stell die Methode auf POST und die URL auf https://api.occultapi.com/api/astro/chart/.
Header
Füg X-API-Key mit deinem Occult-API-Schlüssel und Content-Type: application/json hinzu.
{
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
}Body
Übergib die Geburtsdaten als Variablen im JSON-Body aus vorherigen Knoten.
{
"chart_name": "RashiChart",
"datetime": "1990-05-15T14:30:00+05:30",
"latitude": 28.6139,
"longitude": 77.209,
"ayanamsa": "lahiri",
"ascendant_pos": "cusp",
"notation": "degree"
}Workflow-Beispiel
Erstell einen Chatflow, in dem der Nutzer seine Geburtsdaten eingibt, der HTTP-Knoten die Occult API aufruft und ein Antwortknoten das Ergebnis formatiert.
{
"nodes": [
{
"type": "start",
"data": { "variables": ["datetime", "latitude", "longitude"] }
},
{
"type": "http-request",
"data": {
"method": "POST",
"url": "https://api.occultapi.com/api/astro/chart/",
"headers": {
"X-API-Key": "={{$env.OCCULT_API_KEY}}",
"Content-Type": "application/json"
},
"body": {
"chart_name": "RashiChart",
"datetime": "={{start.datetime}}",
"latitude": "={{start.latitude}}",
"longitude": "={{start.longitude}}",
"ayanamsa": "lahiri",
"ascendant_pos": "cusp",
"notation": "degree"
}
}
},
{
"type": "llm",
"data": {
"prompt": "Format this natal chart data into a readable summary: {{http.body}}"
}
}
]
}