Cloudflare 中文文档
AI Gateway
编辑这个页面
跳转官方原文档
Set theme to dark (⇧+D)

Azure OpenAI

https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/azure-openai/{resource_name}/{deployment_name}

When making requests to Azure OpenAI, you will need:

  • AI Gateway account tag
  • AI Gateway gateway name
  • Azure OpenAI API key
  • Azure OpenAI resource name
  • Azure OpenAI deployment name (aka model name)

Your new base URL will use the data above in this structure: https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/azure-openai/{resource_name}/{deployment_name}. Then, you can append your endpoint and api-version at the end of the base URL, like .../chat/completions?api-version=2023-05-15.

If you are using the openai-node library, you can set your endpoint like this: