{
  "opencollection": "1.0.0",
  "info": {
    "name": "Azure AI Foundry Model Inference REST API",
    "version": "2024-10-21"
  },
  "items": [
    {
      "info": {
        "name": "Chat Completions",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Create a chat completion",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{resource}.services.ai.azure.com/openai/deployments/:deployment-id/chat/completions",
            "params": [
              {
                "name": "deployment-id",
                "value": "",
                "type": "path",
                "description": "Foundry deployment name"
              },
              {
                "name": "api-version",
                "value": "",
                "type": "query"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "api-key",
              "value": "{{api-key}}",
              "placement": "header"
            }
          },
          "docs": "Create a chat completion"
        },
        {
          "info": {
            "name": "Create a chat completion (OpenAI v1-compatible route)",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{resource}.services.ai.azure.com/openai/v1/chat/completions",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "OpenAI-compatible route. The model deployment is selected by the `model`\nfield in the request body rather than the URL path.\n"
        }
      ]
    },
    {
      "info": {
        "name": "Completions",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Create a text completion",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{resource}.services.ai.azure.com/openai/deployments/:deployment-id/completions",
            "params": [
              {
                "name": "deployment-id",
                "value": "",
                "type": "path"
              },
              {
                "name": "api-version",
                "value": "",
                "type": "query"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "api-key",
              "value": "{{api-key}}",
              "placement": "header"
            }
          },
          "docs": "Create a text completion"
        }
      ]
    },
    {
      "info": {
        "name": "Embeddings",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Create embeddings",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{resource}.services.ai.azure.com/openai/deployments/:deployment-id/embeddings",
            "params": [
              {
                "name": "deployment-id",
                "value": "",
                "type": "path"
              },
              {
                "name": "api-version",
                "value": "",
                "type": "query"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "api-key",
              "value": "{{api-key}}",
              "placement": "header"
            }
          },
          "docs": "Create embeddings"
        },
        {
          "info": {
            "name": "Create embeddings (OpenAI v1-compatible route)",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{resource}.services.ai.azure.com/openai/v1/embeddings",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "client_credentials",
              "accessTokenUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Create embeddings (OpenAI v1-compatible route)"
        }
      ]
    },
    {
      "info": {
        "name": "Images",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Generate images",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{resource}.services.ai.azure.com/openai/deployments/:deployment-id/images/generations",
            "params": [
              {
                "name": "deployment-id",
                "value": "",
                "type": "path"
              },
              {
                "name": "api-version",
                "value": "",
                "type": "query"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "api-key",
              "value": "{{api-key}}",
              "placement": "header"
            }
          },
          "docs": "Generate images"
        }
      ]
    },
    {
      "info": {
        "name": "Models",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List available models",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{resource}.services.ai.azure.com/openai/models",
            "params": [
              {
                "name": "api-version",
                "value": "",
                "type": "query"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "api-key",
              "value": "{{api-key}}",
              "placement": "header"
            }
          },
          "docs": "List available models"
        }
      ]
    }
  ],
  "bundled": true
}