Skip to content

Python Media and Metadata Functions

Akshay B edited this page Mar 16, 2026 · 1 revision

Python Media and Metadata Functions (Azure Functions)

This document details media processing and metadata extraction routes in PluckIt.Processor.

Documentation metadata

  • Audience: external contributors
  • Last reviewed: 2026-03-16
  • Scope: media + metadata contract only

Endpoint inventory

MediaFunctions

  • POST /api/process-image
    • Runs image processing workflow for user-provided media.
    • Input images are processed through the service media pipeline and produce segmentation/metadata-ready payloads.
  • POST /api/extract-clothing-metadata
    • Extracts metadata for a clothing image payload.
    • Supports API-key and Azure AD validation modes depending on METADATA_EXTRACT_AUTH_MODE.

Behavior notes

  • /api/process-image is one of the core runtime-heavy routes and is used by the .NET worker for upload enrichment.
  • extract-clothing-metadata can operate either with explicit API-key auth or Azure AD bearer auth.

Metadata route auth mode (/api/extract-clothing-metadata)

  • METADATA_EXTRACT_AUTH_MODE=api-key
    • Requires x-api-key header and configured METADATA_EXTRACT_API_KEY
  • METADATA_EXTRACT_AUTH_MODE=azuread
    • Requires Authorization: Bearer <token>
    • Validates token against:
      • METADATA_EXTRACT_AZURE_AD_AUDIENCE
      • METADATA_EXTRACT_AZURE_AD_ISSUER

Clone this wiki locally