by Faro
Generate and edit images with OpenAI gpt-image-2. Supports multiple output sizes, quality levels, and multipart image editing with optional masks for region-constrained edits.
Generate an image from a text prompt with OpenAI gpt-image-2. Supports low/medium/high quality and 1024x1024, 1024x1536, or 1536x1024 sizes.
Quality (0-100) for jpeg/webp output.
curl -X POST "https://api.askfaro.com/invoke/openai-image/generate_image" \
-H "Authorization: Bearer <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"arguments": {
"prompt": "<prompt>"
}
}'faro invoke openai-image/generate_image --params '{"prompt":"<prompt>"}'Install pip install askfaro-cli, then faro auth login.
Edit, transform, or compose a new image with OpenAI gpt-image-2. Pass one reference image (as a string) to modify or reimagine it. Pass multiple reference images (as an array) to compose a new image using all of them — e.g., a product still life from individual product photos. The prompt determines the operation: "add a blue border" modifies; "create a similar scene showing X" reimagines; "compose these into a gift basket" composes.
Optional base64-encoded mask. When provided, edits apply only to transparent pixels. Use only when passing a single reference image — masks apply to the first image.
Base64-encoded reference image, or an array of 1–10 base64 reference images for multi-reference composition.
Edit, transformation, or composition instruction. The prompt determines whether the call modifies ("add a red bowtie"), reimagines in the same style ("create a similar scene showing X"), or composes from the references ("compose these items into a gift basket").
curl -X POST "https://api.askfaro.com/invoke/openai-image/edit_image" \
-H "Authorization: Bearer <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"arguments": {
"image": "<image>",
"prompt": "<prompt>"
}
}'faro invoke openai-image/edit_image --params '{"image":"<image>","prompt":"<prompt>"}'Install pip install askfaro-cli, then faro auth login.
Generate and edit images with OpenAI's gpt-image-2. Two tools: one for text-to-image, one for image-conditioned edits and composition.
generate_imageText-to-image. Pick size, quality, and n (number of variants).
{
"prompt": "A minimalist line drawing of a fox curled asleep, soft pastel background",
"size": "1024x1024",
"quality": "high",
"n": 1
}
size — 1024x1024, 1024x1536 (portrait), 1536x1024 (landscape), autoquality — low, medium, high, auton — 1–10 variantsedit_imageImage-conditioned generation. Pass one or more reference images and an instruction; optionally include a mask to constrain edits to a region. Useful for in-painting, style transfer, and multi-image composition.
{
"prompt": "Add subtle warm sunset lighting from the right",
"images": ["data:image/png;base64,...."],
"mask": "data:image/png;base64,....",
"size": "1024x1024",
"quality": "high"
}
Pass images as either URLs or base64 data URLs. The output is returned as a base64 PNG or as a hosted URL (see the response schema).
Variable, billed from upstream OpenAI usage on completion. Roughly:
Higher resolutions and n>1 scale linearly. Charged only on success.
An OpenAI API key on the publisher's Faro connection — no user-side configuration required.