Skip to main content

Overview

Azure OpenAI tools let you run prompts against your own Azure OpenAI Service deployments. They support plain text generation, structured output validated by a JSON schema, and document/image analysis, all against the deployment, endpoint, and API key you configure.

Key Features

  • AZURE_OPENAI_INVOKE
    • Send a prompt (prompt) to an Azure OpenAI deployment for text generation
    • Optional structured output with a JSON schema (json_schema) — the schema must have "type": "object" at the top level
  • AZURE_OPENAI_INVOKE_WITH_FILE
    • Send files along with a prompt for document and image analysis
    • file_link accepts up to 30 file URLs; supported types are PDF, PNG, JPEG/JPG, WEBP, and GIF, up to 100MB per file
    • Also supports structured output via json_schema (object-type schemas only)

Authentication

Azure OpenAI tools are configured per step (or fall back to environment variables):
  • deployment — the Azure OpenAI deployment name (not the model name). Falls back to AZURE_OPENAI_MODEL_DEPLOYMENT_NAME / AZURE_OPENAI_DEPLOYMENT_NAME.
  • endpoint — the resource endpoint, e.g. https://my-resource.openai.azure.com/. Falls back to AZURE_OPENAI_ENDPOINT. Alternatively, set resource_name (the resource subdomain, e.g. my-resource); it is derived from the endpoint when omitted.
  • api_key — the Azure OpenAI API key (stored as a secret). Falls back to AZURE_OPENAI_API_KEY.
  • api_version — the API version. Falls back to AZURE_OPENAI_API_VERSION, then preview. Use preview for the rolling v1 surface, or a dated value such as 2025-04-01-preview.
Optional settings: temperature (0–2, default 0.7), is_reasoning_model (see Notes), and timeout_seconds (default 300). Note: Treat API keys as sensitive information and never commit them to public repositories.

Usage Examples

Example: Structured Output with JSON Schema

Example: Document Analysis

Notes

  • The json_schema must have "type": "object" at the top level. Wrap arrays in an object property, e.g. { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "string" } } } }. Without json_schema, the result is returned as a string.
  • Reasoning models (o-series / GPT-5) reject the temperature parameter. Since Azure deployment names are user-chosen, this is inferred from the deployment name; set is_reasoning_model explicitly to override the heuristic.
  • Requests time out after timeout_seconds (default 300 seconds / 5 minutes).
  • AZURE_OPENAI_INVOKE_WITH_FILE accepts at most 30 files per call, 100MB per file. Unsupported file types cause the step to fail with an error.