Skip to main content
Use metadata to carry your own application context through the task lifecycle.

Attach metadata

const task = await mynth.generate({
  prompt: "Packaging concept for a botanical tea brand",
  model: "google/gemini-3.1-flash-image",
  metadata: {
    requestId: "req_123",
    userId: "usr_123",
    campaign: "spring-launch",
  },
});
Mynth returns that metadata in:
  • the full task object
  • webhook payloads
This is useful for mapping Mynth tasks back to your own jobs, users, orders, or records.

Metadata limits

Metadata can contain nested objects and arrays. The maximum payload size is 2 KB.