Azure OpenAI Batch Job

The Azure OpenAI Batch Job job type submits an asynchronous batch inference job against an Azure OpenAI deployment using a pre-uploaded input file. The wrapped artefact is a chat-capable deployment — Polysync's External Id is the deployment name with a ::batch suffix ("{deployment}::batch") to distinguish it from the sibling Chat Completion Job on the same deployment.

This job type is supported on the Azure OpenAI platform.

Required job fields

  • External Id"{deployment}::batch" (set automatically on import).
  • Job TypeAzure OpenAI Batch Job (set automatically on import).
  • OpenAI Input File ID (job attribute) — required; the pre-uploaded file id (file-…) containing the batch requests.
  • OpenAI Batch Endpoint (job attribute) — optional; defaults to /chat/completions.
  • OpenAI Completion Window (job attribute) — optional; defaults to 24h.

Job discovery

Polysync creates a Batch Job for every chat-capable deployment returned by GET /deployments?api-version=2023-05-01, alongside the Chat Completion Job. The deployment name in the External Id is suffixed with ::batch and stripped before any service call.

Parameter handling

No input parameters — the input is the pre-uploaded file referenced by the OpenAI Input File ID job attribute. Outputs are populated from the batch status response:

Polysync parameter Direction Role
output_file_id Output output_file_id from the completed batch.
error_file_id Output error_file_id (if any).
request_counts_total Output request_counts.total.
request_counts_completed Output request_counts.completed.
request_counts_failed Output request_counts.failed.

Request body:

{
  "input_file_id":     "<OpenAI Input File ID>",
  "endpoint":          "<OpenAI Batch Endpoint>",
  "completion_window": "<OpenAI Completion Window>"
}

Execution flow

  1. Polysync POSTs the body above to /openai/batches?api-version=2024-10-21; the response id is the Polysync RunId (e.g., batch_…).

  2. Status is polled via GET /openai/batches/{batchId}?api-version=2024-10-21:

    Azure OpenAI batch status Polysync status
    validating / in_progress / finalizing / cancelling Running
    completed Success
    failed / expired Failed

    Start / end timestamps come from created_at / completed_at (Unix seconds). Failure detail comes from errors.

  3. Cancel is supported via POST /openai/batches/{batchId}/cancel?api-version=2024-10-21.

Monitor URL

Same as Azure OpenAI Chat Completion — generic Cognitive Services resource overview (Azure OpenAI does not expose a per-batch deep link).

Best practices

  • Upload the input file via the OpenAI Files API in a separate workflow and store the resulting file_id as a Polysync Secret Vault entry; resolve it into the OpenAI Input File ID job attribute at run time.
  • Set realistic OpenAI Completion Window values — 24h is the default and matches Azure OpenAI's published SLA.
  • Capture output_file_id as an Input&Output parameter and pipe it to a downstream Task that downloads and processes the results.

Troubleshooting

  • Batch immediately failed with input_file_not_found — the file id was uploaded under a different OpenAI resource. Files are scoped to the resource that uploaded them.
  • Quota error on submit — Azure OpenAI Batch has its own quota tier separate from real-time deployments. Request quota in the Azure portal.
  • API Key works for Batch but not discovery — that's by design; Batch operations are data-plane (key OK), discovery is control-plane (AAD required).