from pathlib import Path
import requests,json,base64
P=Path('/opt/creature-lib-20261017');out=P/'sources/generated-wolf';out.mkdir(exist_ok=True)
prompt='A photorealistic wildlife studio photograph of one adult Eurasian grey wolf, neutral quadruped standing pose, full body side view with slight three quarter angle so all four legs are clearly separated. Head facing left, straight level back, natural long slender legs, athletic lean torso, a narrow long muzzle, natural small amber eyes seated in sockets, short triangular ears. Real dense grey and brown fur with cream underside. Bushy tail hanging downward, not curled upward. Feet planted flat. Plain pure white seamless background, no ground shadow. Keep every paw, both ears and tail fully inside frame with margin. This is a REAL wolf photographed, not a cartoon, not Disney, not a husky, not a toy, not a sculpt. Anatomically accurate natural proportions. No collar, no props, no text.'
req={'prompt':prompt,'size':'1024x1024','n':1,'response_format':'b64_json'}
(out/'reference-request.json').write_text(json.dumps(req,indent=2))
r=requests.post('http://127.0.0.1:8093/v1/images/generations',json=req,timeout=200);r.raise_for_status();data=r.json();im=data['data'][0]
if 'b64_json' in im:raw=base64.b64decode(im['b64_json'])
else:
 u=im['url'];raw=requests.get(u.replace('http://forge-vertex:8080','http://127.0.0.1:8093'),timeout=60).content
(out/'reference.png').write_bytes(raw);print('reference bytes',len(raw))
(out/'provenance.json').write_text(json.dumps({'author':'Forge generated reference','source':'Vertex image service, operator-authorised generation','prompt':prompt,'model':data.get('model','service default'),'input':'No third-party input image','ownership':'Generated for Forge; not a licensed third-party animal model'},indent=2))
