Image Metadata Writer API

About

Easily write, resize, and enrich your images with standardized metadata using this powerful RESTful API. This API supports syncing metadata across XMP, IPTC, EXIF, and more.

API Documentation

POST
https:/domainname/image_metadata_updater/image_metadata_updater.php
Copied!

Request example

Copied!
curl -X POST https:/domainname/image_metadata_updater/image_metadata_updater.php \
-H "Content-Type: application/json" \
-d @test_payload.json

Where test_payload.json contains your JSON body.

Method: POST

Content Type: multipart/form-data

Body parameters

Copied!
{
  "image_url": "https://image.png", 
  "return": "url",
  "sync_metadata": true, 
  "resize": true,
  "dimensions" : "1020X1025",
  "convert_format" : false,
  "new_format": "webp",
  "title": "test_xmp_title", 
  "description": "test_xmp_caption", 
  "creator": "test_xmp_author", // Synced to XMP-dc:creator, IPTC:By-line, EXIF:Artist
  "copyright_notice": "test_xmp_copyright_notice - do not copy this image without author permission",
  "copyright_status": "False", 
  "keywords": "test_xmp_keywords",
  "create_date": "2025-02-23T15:30:00Z",
  "category": "Sports", 
  "supplemental_category": "test_xmp_niche_category", 
  "caption_writer": "test_xmp_desc_writer",
  "city": "test_xmp_city", 
  "region": "test_xmp_state", 
  "country": "test_xmp_country_code", 
  "credit": "test_xmp_credit - John Doe Photography", 
  "source": "test_xmp_source - test_user", 
  "headline": "test_xmp_headline - theme selection text", 
  "instructions": "test_idp_xmp_instructions", 
  "transmission_reference": "test_xmp_transmission_reference", 
  "job_reference": "test_xmp_job_name",
  "rating": "5", 
  "label": "Red", 
  "creator_tool": "Adobe Photoshop 2024", 
  "usage_terms": "Allowed for educational purposes only", 
  "creator_contact_address": "John Doe, johndoe@example.com", 
  "creator_contact_email": "test_xmp_contact@johndoe.com", 
  "license": "https://creativecommons.org/licenses/by/4.0/", 
  "attribution_name": "Jane Doe", 
  "attribution_url": "https://janedoephotography.com", 
  "alt_text": "test_xmp_alt_text", 
  "licensor_name": "test_xmp_doe_agency",
  "licensor_url": "https://doeagency.com", 
  "identifier": "test_xmp_image_12345", 
  "latitude": "29.7604", 
  "latitude_ref": "N", 
  "longitude": "95.3698",
  "longitude_ref": "W",
  "urgency": "5", 
  "file_comment": "Metadata updated by API", 
  "icc_profile_description": "sRGB IEC61966-2.1" 
}

Authentication

All API requests to ApyHub services need to be authenticated. Currently we support tokens or basic-authentication mechanisms. You can generate and view your existing credentials from your workspace settings (on the left side of the navbar) and go to “API Keys".

Points to note:

  • Credential secrets are generated on the fly and are not stored in plain text, so on generating a credential please save the secrets somewhere safe.
  • Use the apy-token as the header parameter to pass the token.
  • Use the Authorization header to send the basic authentication credentials.

Error Codes

Copied!
{
    "error": true,
    "message":"Invalid image URL or image data."
}