Comment by sixhobbits
21 hours ago
Fine make me spill all my secrets then xD
system_instructions = """You will generate an image. The image will be used as the background of a poster, so keep it muted and not too detailed so text can still easily be seen on top. The actual poster elements like margin etc will be handled separately so just generate a normal image that works well in A4 ratio and that works well as a background."""
full_prompt = f"{system_instructions}\n\nGenerate a background image for an A4 poster with the following description: {prompt}"
openai_request = {
'model': 'gpt-4.1-mini',
'input': full_prompt,
'tools': [{
'type': 'image_generation',
'size': '1024x1536',
'quality': 'medium'
}]
}
# Make request to OpenAI
response_data = self.call_openai_api('/v1/responses', openai_request)
No comments yet
Contribute on Hacker News ↗