Skip to content

ApoAlly API#

Code Examples#

Bash#

#!/bin/bash

# ApoAlly API URL
API_URL="https://api.apoally.de/api/chat/completions"

# API Key
API_KEY="YOUR_API_KEY"

# Request Body
REQUEST_BODY=$(cat <<EOF
{
  "model": "apoally",
  "messages": [
    {
      "role": "user",
      "content": "Please provide me with the latest information on the hospital reform."
    }
  ],
  "temperature": 0.7
}
EOF
)

# API Request
response=$(curl -s -X POST "$API_URL" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d "$REQUEST_BODY")

# Output Response
echo "Response from ApoAlly API:"
echo "$response"