Skip to content

Instantly share code, notes, and snippets.

@dat-boris
Created January 29, 2025 03:13
Show Gist options
  • Save dat-boris/dc07e92862b8454499f19b397dd7e8da to your computer and use it in GitHub Desktop.
Save dat-boris/dc07e92862b8454499f19b397dd7e8da to your computer and use it in GitHub Desktop.
A sample CURL command for testing Azure AI service (not to be confused with serverless API)
# Example URL: https://ai-useast2hub770089131882.services.ai.azure.com/models/chat/completions?api-version=2024-05-01-preview
# - Note the `services.ai.azure.com` domain name, which use `api-key` for auth
# - instead of the `models.ai.azure.com` - which will use `Token bearer`
curl -X POST "${AZURE_SERVICE_URL}" \
-H "Content-Type: application/json" \
-H "api-key: ${AZURE_SERVICE_KEY}" \
-d '{
"messages": [
{
"role": "user",
"content": "What is the airspeed velocity of an unladen swallow?"
}
],
"model": "Llama-3.2-90B-Vision-Instruct",
"max_tokens": 2048,
"temperature": 0.8,
"top_p": 0.1,
"presence_penalty": 0,
"frequency_penalty": 0
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment