Marketplace/openai-image
OpenAI Image

OpenAI Image

Active

by Faro

2 tools
upstream:

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.

Imageimage-generationopenaigpt-image-2text-to-imageimage-editing

Tools (2)

Generate

Usage-based · ~$0.008 (low) to ~$0.27 (high) per generated image at 1024×1024, depending on quality. Larger sizes cost more. Charged only on successful responses.

Generate an image from a text prompt with OpenAI gpt-image-2. Supports low/medium/high quality and 1024x1024, 1024x1536, or 1536x1024 sizes.

Usage-based · ~$0.008 (low) to ~$0.27 (high) per generated image at 1024×1024, depending on quality. Larger sizes cost more. Charged only on successful responses.

Example prompts

  • Generate an image from a text prompt with gpt-image-2
  • Create a 1024×1536 vertical poster image from a description
  • Generate an image with a transparent background as PNG
  • Make a wide 1536×1024 banner image

Parameters

nintegeroptionaldefault: 1
sizestringoptionaldefault: "1024x1024"
promptstringrequired
qualitystringoptionaldefault: "low"
backgroundstringoptional
output_formatstringoptionaldefault: "png"
output_compressionintegeroptional

Quality (0-100) for jpeg/webp output.

API Usage

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>"
  }
}'

CLI Usage

faro invoke openai-image/generate_image --params '{"prompt":"<prompt>"}'

Install pip install askfaro-cli, then faro auth login.

Edit

$0.04 per 1,000 output_tokens · ~$0.02 (low) to ~$0.27 (high) per edit, depending on quality. Includes reference-image cost. Charged only on successful responses.

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.

$0.04 per 1,000 output_tokens · ~$0.02 (low) to ~$0.27 (high) per edit, depending on quality. Includes reference-image cost. Charged only on successful responses.

Example prompts

  • Edit a photo and swap the background using a text instruction
  • Inpaint or remove an object from an image using a mask
  • Compose a new image by combining multiple reference photos
  • Generate a transparent-background PNG version of a logo

Parameters

nintegeroptionaldefault: 1
maskstringoptional

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.

sizestringoptionaldefault: "auto"
imagerequired

Base64-encoded reference image, or an array of 1–10 base64 reference images for multi-reference composition.

modelstringoptionaldefault: "gpt-image-2"
promptstringrequired

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").

qualitystringoptionaldefault: "low"
backgroundstringoptional
output_formatstringoptionaldefault: "png"

API Usage

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>"
  }
}'

CLI Usage

faro invoke openai-image/edit_image --params '{"image":"<image>","prompt":"<prompt>"}'

Install pip install askfaro-cli, then faro auth login.

README

OpenAI Image

Generate and edit images with OpenAI's gpt-image-2. Two tools: one for text-to-image, one for image-conditioned edits and composition.

Tools

generate_image

Text-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
}
  • size1024x1024, 1024x1536 (portrait), 1536x1024 (landscape), auto
  • qualitylow, medium, high, auto
  • n — 1–10 variants

edit_image

Image-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).

Pricing

Variable, billed from upstream OpenAI usage on completion. Roughly:

  • 1024×1024 low: ~10–15 credits (≈ $0.010–$0.015)
  • 1024×1024 medium: ~40 credits (≈ $0.04)
  • 1024×1024 high: ~180 credits (≈ $0.18)

Higher resolutions and n>1 scale linearly. Charged only on success.

Auth

An OpenAI API key on the publisher's Faro connection — no user-side configuration required.