{
  "operationId": "AIGateway_ChatCompletions",
  "method": "POST",
  "path": "/deployments/{deployment-id}/chat/completions",
  "summary": "Microsoft Azure API Management Chat Completions Via AI Gateway",
  "requestExamples": [
    {
      "contentType": "application/json",
      "name": "ChatCompletionExample",
      "example": {
        "messages": [
          {
            "role": "system",
            "content": "You are a helpful assistant."
          },
          {
            "role": "user",
            "content": "What is Azure API Management?"
          }
        ],
        "max_tokens": 256,
        "temperature": 0.7
      }
    }
  ],
  "responseExamples": [
    {
      "status": "200",
      "contentType": "application/json",
      "name": "ChatCompletionExample",
      "example": {
        "id": "chatcmpl-abc123def456",
        "object": "chat.completion",
        "created": 1714000000,
        "model": "gpt-4o",
        "choices": [
          {
            "index": 0,
            "message": {
              "role": "assistant",
              "content": "Azure API Management is a hybrid, multicloud management platform for APIs across all environments."
            },
            "finish_reason": "stop"
          }
        ],
        "usage": {
          "prompt_tokens": 24,
          "completion_tokens": 18,
          "total_tokens": 42
        }
      }
    }
  ]
}