For your own product and logo, upload each with its explicit reference or logo role, then send reference_storage_ids and a separate logo_storage_id. Generic images and Ad Library generation accept logo_mode: model uses the supplied mark as an image-model reference, overlay places it deterministically, and none omits it. With a logo, model is the default. Model rendering may alter the mark; overlay preserves the original.
Adapt an Ad Library reference
Search by brief, or copy an ad ID from Lahjty and inspect that exact ID. Search and detail require ad-library:read; preparation and uploads require ad-library:write; generation requires images:write. Suggestions reflect metadata relevance, not measured performance.
Search with brief and filters, then choose an ID from the returned items. A copied ID can skip search.
Read /ad-library/{id}. If preparation.status is ready, use contract.fields and reference_requirement directly. Otherwise disclose preparation.analysis_credits and obtain authorization before POST /prepare. An existing prepared contract costs zero; new analysis currently costs one credit.
Upload required, user-authorized product references or a logo through /ad-library/uploads. Use the returned storage IDs from the same account; never substitute another account's ID.
Fill template_fields using the actual field IDs from the contract and the user's facts. Generate only after approval of the five-credit cost. Preserve the exact body and Idempotency-Key after a timeout; recover by request ID before retrying.
Replace placeholder field and storage IDs with the inspected contract and upload result. Omit reference_storage_ids only when references are optional. These are request examples, not executed results.