foundry_set_image_endpoint: Set Image Generation Endpoint

View source: R/image.R

foundry_set_image_endpointR Documentation

Set Image Generation Endpoint

Description

Set the Azure endpoint for image generation (DALL-E). Use this when your DALL-E model is deployed on a different Azure resource than your chat/embedding models.

Usage

foundry_set_image_endpoint(endpoint)

Arguments

endpoint

Character. The full Azure endpoint URL for image generation.

Details

If not set, foundry_image() will fall back to AZURE_FOUNDRY_ENDPOINT. Use this function when DALL-E is deployed on a separate Azure resource.

Value

Invisibly returns the endpoint that was set.

Examples

local({
  old <- Sys.getenv("AZURE_FOUNDRY_IMAGE_ENDPOINT", unset = NA_character_)
  on.exit({
    if (is.na(old)) {
      Sys.unsetenv("AZURE_FOUNDRY_IMAGE_ENDPOINT")
    } else {
      Sys.setenv(AZURE_FOUNDRY_IMAGE_ENDPOINT = old)
    }
  })
  foundry_set_image_endpoint("https://example.openai.azure.com")
})

foundryR documentation built on Sept. 25, 2026, 1:10 a.m.