Skip to content

ApoAlly API#

Code Examples#

Python with Requests#

```python import requests

api_url = “https://api.apoally.de/api/chat/completions” headers = { “Authorization”: “Bearer YOUR_API_KEY”, “Content-Type”: “application/json” } data = { “model”: “apoally”, “messages”: [ {“role”: “user”, “content”: “Please provide me with the latest information on the hospital reform.”} ], “temperature”: 0.7 }

response = requests.post(api_url, headers=headers, json=data) print(response.json()[“choices”][0][“message”][“content”])