API Methods
Last updated
// Some code
curl -X GET https://GETMethod.zerve.cloud/output
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"// Some code
import requests
url = "https://GETMethod.zerve.cloud/output"
api_token = "YOUR_API_TOKEN" # Replace with your actual API token
headers = { "Accept": "application/json", "Authorization": f"Bearer {api_token}" }
response = requests.get(url, headers=headers)
if response.status_code == 200:
print(response.json())
else:
print(f"Error: {response.status_code}, {response.text}")// Some code
curl -X GET https://ModelAPI.zerve.cloud/classifier
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"// Some code
import requests
url = 'https://ModelAPI.zerve.cloud/classifier'
data = {
"payload" : {
"realSum": [194.033698],
"room_shared": [false],
"room_private": [true],
"person_capacity": [2.0]
}
}
response = requests.post(url, json=data)
if response.status_code == 200:
print(response.json())
else:
print(f"Error: {response.status_code}, {response.text}")