Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/CCCpan/ai-api-integration
/ generate_image
Function
generate_image
src/python/chat.py:44–51 ·
view source on GitHub ↗
(prompt)
Source
from the content-addressed store, hash-verified
42
43
44
def
generate_image(prompt):
45
resp = client.images.generate(
46
model=
"gpt-image-2"
,
47
prompt=prompt,
48
size=
"1024x1024"
,
49
n=1,
50
)
51
return
resp.data[0].url
52
53
54
def
main():
Callers
1
main
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected