eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoiZXh0ZXJuYWwiLCJhY2NvdW50SWQiOiI1Yjk5M2QxMDA0YmJhZDJlMjU4YjMyNTAiLCJzZXNzaW9uSWQiOiJhMDEzNzA3Mi0wZDFiLTQ4ZWEtODNlMy01YWVmMDkzNzc3NzQiLCJpYXQiOjE1MzY3NjkzMjQsImV4cCI6MTUzNzM3NDEyNH0.eDoL4cATx__N5pP-s4BlrsYsbn8PtQl0MWVBYr_yapk
The RAI API has two endpoints Parse and Resolve. RAI documentation
import requests
token = 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoiZXh0ZXJuYWwiLCJhY2NvdW50SWQiOiI1Yjk5M2QxMDA0YmJhZDJlMjU4YjMyNTAiLCJzZXNzaW9uSWQiOiJhMDEzNzA3Mi0wZDFiLTQ4ZWEtODNlMy01YWVmMDkzNzc3NzQiLCJpYXQiOjE1MzY3NjkzMjQsImV4cCI6MTUzNzM3NDEyNH0.eDoL4cATx__N5pP-s4BlrsYsbn8PtQl0MWVBYr_yapk'
headers = { 'Authorization': token }
# Parse
data = { 'title': 'Shake It Off' }
r = requests.post('https://api.cultofrai.com/api/parse', headers=headers, data=data)
print(r.text)
# Resolve
params = { 'albumTitle': 'Shake It Off' }
r = requests.get('https://api.cultofrai.com/api/resolve', headers=headers, params=params)
print(r.text)