GPT-Image-2
Generate images through Frevana's AI Factory OpenAI backend with a fixed contract:
- provider:
openai - model:
gpt-image-2
This skill returns the validated API response JSON unchanged. Treat data[0].image_url as the primary image URL.
What This Skill Needs
- user-provided
promptorcontents - optional OpenAI image options:
n,size,quality,background,output_format,output_compression FREVANA_TOKENin the environment, or an explicit--tokenoverride for the current runcurlbashpython3
Execution Order
- Confirm the user provided the image prompt.
- Do not ask for or pass through
providerormodel; this skill fixes them. - Prefer the script over ad hoc
curlcommands. - Let the script read
FREVANA_TOKENfirst. - In non-interactive runs, fail fast if the token is missing and tell the user to set
FREVANA_TOKENor pass--token. - Return the raw API response JSON, or the first image URL when the user only wants the hosted asset.
- Save the JSON with
--outputwhen useful.
Allowed Options
--n:1-10--size:auto,1024x1024,1536x1024,1024x1536,256x256,512x512,1792x1024,1024x1792--quality:standard,hd,low,medium,high,auto--background:transparent,opaque,auto--output-format:png,jpeg,webp--output-compression:1-100
Command
bash <skill-path>/scripts/generate_image.sh \
--prompt "A cinematic product photo of a matte black espresso machine on travertine" \
--size 1536x1024 \
--quality high \
--background opaque \
--output-format png \
--output ./out/gpt-image-2-result.jsonResponse Shape
{
"created": 1777367067,
"background": "opaque",
"output_format": "png",
"quality": "high",
"size": "1536x1024",
"data": [
{
"revised_prompt": "string",
"image_url": "https://static.frevana.com/images/user-id/example-image-id.png"
}
],
"credits_consumed": 1
}Notes
- Do not pass
--provideror--model; the wrapper rejects overrides. - Do not rewrite, proxy, or transform the returned Frevana image URLs unless the user asks for that.