Skip to main content

Request Metadata

You can attach custom metadata to any API request by including a request_metadata field in the JSON body. AIGEN will return the same data in the response, making it easy to correlate requests with your internal systems.

Use Cases

  • Tracking — Attach your internal reference ID to match API results with your records.
  • Auditing — Include user IDs or session IDs for audit trails.
  • Routing — Tag requests with department or workflow identifiers for downstream processing.

Example

Request

{
"image": "<base64_string>",
"request_metadata": {
"ref_id": "INV-2026-0042",
"department": "accounting",
"uploaded_by": "user_123"
}
}

Response

The request_metadata is returned unchanged in the API response:

{
"status": "success",
"data": [ ... ],
"response_id": "5502d61d-8509-4478-b5b3-86ab6fcc106e",
"request_metadata": {
"ref_id": "INV-2026-0042",
"department": "accounting",
"uploaded_by": "user_123"
}
}

Notes

  • The request_metadata field accepts any valid JSON object.
  • It does not affect API processing — it is purely pass-through data.
  • Available on all API endpoints.