Tools/image
Image

Image

Active

Your agent can't process or generate pixels in its sandbox; this resizes, converts, generates, edits, upscales, and cuts out backgrounds.

6 tools

A complete image toolkit: deterministic processing (resize, crop, convert, filter, overlay, text), AI generation and editing, upscaling to 2x or 4x, and background removal to a transparent cutout. Generate images from a prompt at a standard or a high-fidelity 4K tier, edit and compose existing images, upscale low-resolution images with photorealistic detail, remove backgrounds, or run fast pixel operations.

Imagesimagegenerateeditresizeconverttransformai4kupscalebackground-removaltransparent

Tools (6)

Process

Resize, crop, rotate, convert, filter, overlay (logo), or add text to an image, all in one call.

Usage-based · 0.5 credits per megapixel

Example prompts

  • Resize this image to 800×600 and convert it to WebP
  • Convert this PNG screenshot to JPG at 80% quality
  • Denoise this photo and convert to grayscale
  • Add my logo PNG to the top-right corner of this product photo
  • Add a 'DRAFT' watermark in 80px white text with a black box across the middle of this image
  • Run edge detection on this product photo so I can use the result as a mask

Parameters

blurobjectoptional

Apply a Gaussian blur. Omit to skip.

cropobjectoptional

Crop to a pixel rectangle (applied before resize). Omit to skip.

textobjectoptional

Draw text on the image, optionally with a background box. Applied last. Omit to skip.

resizeobjectoptional

Resize operation. Omit to skip.

rotateobjectoptional

Rotate operation (applied first). Omit to skip.

denoiseobjectoptional

Non-local-means denoise, good for photos with sensor noise. Slow on large images. Omit to skip.

overlayobjectoptional

Paste another image (e.g. a logo) on top. Applied after filters, before text. Omit to skip.

qualityintegeroptionaldefault: 85

Output quality for lossy formats (JPG, WebP). 85 is a good default.

grayscalebooleanoptionaldefault: false

Convert to grayscale.

input_urlstringrequired

Pre-signed GET URL of the source image. Obtain via POST /uploads/presign on faro-api.

thresholdobjectoptional

Binary threshold, produce a pure black-and-white image. Omit to skip.

expires_inintegeroptionaldefault: 3600

Download URL TTL in seconds (default 1h, max 24h).

edge_detectobjectoptional

Canny edge detection, outputs an image showing edges as white lines on black. Omit to skip.

output_formatstringoptionaldefault: "png"

Output image format.

output_filenamestringoptional

Filename for the output file. Defaults to `output.<ext>`.

API Usage

curl -X POST "https://skill.askfaro.com/skills/image/run" \
  -H "Authorization: Bearer faro_<your_key>" \
  -H "Content-Type: application/json" \
  -d '{
  "intent": {
    "prompt": "Resize this image to 800×600 and convert it to WebP"
  }
}'

CLI Usage

askfaro describe image/transform

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

Generate

Generate an image from a text prompt (text-to-image). Returns a hosted download_url for the image. For image-to-image (editing or composing from a reference image), use the edit tool.

Usage-based · 37,500 credits per 1M output tokens, plus 6,250 per 1M prompt tokens

Example prompts

  • Generate an image of a red fox in a snowy forest
  • Create a logo concept for a coffee brand
  • Make a picture of a futuristic city at sunset

Parameters

nintegeroptionaldefault: 1

Number of images to generate.

sizestringoptionaldefault: "auto"

Output dimensions. auto lets the model choose based on the prompt.

promptstringrequired

Text description of the image to generate.

qualitystringoptionaldefault: "low"

Rendering quality. Higher quality costs more tokens. Use generate_hq for high quality or 4K.

backgroundstringoptionaldefault: "auto"

Background handling. Transparent backgrounds are not supported.

output_formatstringoptionaldefault: "png"

Encoding of the returned image.

API Usage

curl -X POST "https://skill.askfaro.com/skills/image/run" \
  -H "Authorization: Bearer faro_<your_key>" \
  -H "Content-Type: application/json" \
  -d '{
  "intent": {
    "prompt": "Generate an image of a red fox in a snowy forest"
  }
}'

CLI Usage

askfaro describe image/generate

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

Generate (HQ)

Generate a high-fidelity image from a text prompt (text-to-image), with output up to 4K. Returns a hosted download_url for the image. For image-to-image, use the edit tool.

Usage-based · 37,500 credits per 1M output tokens, plus 6,250 per 1M prompt tokens

Example prompts

  • Generate a high-resolution 4K image of a mountain landscape
  • Create a detailed, print-quality render of a product

Parameters

nintegeroptionaldefault: 1

Number of images to generate.

sizestringoptionaldefault: "auto"

Output dimensions, up to 4K (3840px long edge). auto lets the model choose based on the prompt.

promptstringrequired

Text description of the image to generate.

qualitystringoptionaldefault: "high"

Rendering quality. Higher quality and larger sizes cost more tokens.

backgroundstringoptionaldefault: "auto"

Background handling. Transparent backgrounds are not supported.

output_formatstringoptionaldefault: "png"

Encoding of the returned image.

API Usage

curl -X POST "https://skill.askfaro.com/skills/image/run" \
  -H "Authorization: Bearer faro_<your_key>" \
  -H "Content-Type: application/json" \
  -d '{
  "intent": {
    "prompt": "Generate a high-resolution 4K image of a mountain landscape"
  }
}'

CLI Usage

askfaro describe image/generate_hq

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

Edit

edit

Edit, transform, or compose a new image. 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.

Usage-based · 37,500 credits per 1M output tokens, plus 10,000 per 1M for the input image and 6,250 per 1M prompt tokens

Example prompts

  • Edit this photo to remove the person in the background
  • Change the color of the car in this image to blue
  • Combine these two images into one composition

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.

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://skill.askfaro.com/skills/image/run" \
  -H "Authorization: Bearer faro_<your_key>" \
  -H "Content-Type: application/json" \
  -d '{
  "intent": {
    "prompt": "Edit this photo to remove the person in the background"
  }
}'

CLI Usage

askfaro describe image/edit

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

Upscale

Upscale an image 2x or 4x to higher resolution with photorealistic detail. Provide image_url (public URL) or image_data (base64); returns a hosted download_url.

Usage-based · 3.75 credits per image

Example prompts

  • Upscale this image to 4x resolution
  • Enhance this low-res photo to higher resolution
  • Make this thumbnail print-ready at 2x
  • Upscale this product image for a large banner

Parameters

regionstringoptionaldefault: "us-central1"

Vertex AI region to run the upscale in.

image_urlstringoptional

Publicly accessible URL of the source image (PNG or JPEG, max 10MB).

image_datastringoptional

Base64-encoded source image (PNG or JPEG, max 10MB).

upscale_factorstringoptionaldefault: "x2"

Upscale factor: x2 or x4.

output_mime_typestringoptionaldefault: "image/png"

Output image format.

API Usage

curl -X POST "https://skill.askfaro.com/skills/image/run" \
  -H "Authorization: Bearer faro_<your_key>" \
  -H "Content-Type: application/json" \
  -d '{
  "intent": {
    "prompt": "Upscale this image to 4x resolution"
  }
}'

CLI Usage

askfaro describe image/upscale

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

Background Removal

Remove the background from an image and return the foreground subject as a transparent-PNG cutout. Provide image_url+image_url_mime_type (public URL) or image_data+image_mime_type (base64).

Usage-based · 150,000 credits per 1M output tokens

Example prompts

  • Remove the background from this product photo
  • Cut out the person in this image onto a transparent background
  • Make this logo's background transparent
  • Give me a transparent PNG of the subject in this picture

Parameters

image_urlstringoptional

Publicly accessible URL of the source image. Requires image_url_mime_type.

image_datastringoptional

Base64-encoded source image (PNG/JPEG/WebP). Requires image_mime_type.

image_mime_typestringoptional

MIME type of image_data.

image_url_mime_typestringoptional

MIME type of the image at image_url.

API Usage

curl -X POST "https://skill.askfaro.com/skills/image/run" \
  -H "Authorization: Bearer faro_<your_key>" \
  -H "Content-Type: application/json" \
  -d '{
  "intent": {
    "prompt": "Remove the background from this product photo"
  }
}'

CLI Usage

askfaro describe image/remove

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

README

Image

A complete image toolkit in one namespace, with four tools:

  • transform: fast, deterministic pixel operations (resize, crop, rotate, convert, filters, overlay, text). No AI.
  • generate: text-to-image at standard quality (fast, low cost).
  • generate_hq: text-to-image at high quality, output up to 4K (3840px), with strong in-image text.
  • edit: edit, restyle, or compose existing images from a prompt (image-to-image), with optional mask.

AI generation & editing

generate / generate_hq: text-to-image. Pass a prompt and get back a hosted download_url for the generated image. generate_hq supports output up to 4K (3840px) and high-fidelity in-image text; generate is the faster, cheaper tier. For image-to-image (editing an existing image, restyling, or composing from one or more reference images), use edit, optionally within a masked region. All four AI tools store the result and return a download_url, the same as transform and upscale. They are billed per token, so cost scales with prompt and output size.

Processing (transform)

Resize, crop, rotate, convert format, and apply filters on images, all in a single call, no AI. Priced per megapixel.

Workflow

  1. Call POST /uploads/presign on faro-api to get a put_url + get_url pair.
  2. PUT your image to put_url.
  3. Call the tool with the get_url as its input URL (input_url for transform, image_url for image-to-image).
  4. Download the result from the returned download_url (default 1h TTL, max 24h). Pure text-to-image needs only a prompt, no upload.

Supported formats

Input (auto-detected)Output
PNG, JPG, WebP, GIF, BMP, TIFFPNG, JPG, WebP, GIF, BMP, TIFF

Operations

All operations are optional and can be combined in one call. Applied in this order: rotate → crop → resize → grayscale → blur → denoise → threshold → edge_detect → overlay → text.

resize

FieldTypeDefaultDescription
widthintegernoneTarget width in pixels (max 8000).
heightintegernoneTarget height in pixels (max 8000).
modestringfitfit = shrink to fit inside the box (never upscales); cover = crop-fill the box; stretch = exact resize ignoring aspect ratio.

crop

FieldTypeDescription
leftintegerLeft edge (px).
topintegerTop edge (px).
rightintegerRight edge (px, exclusive).
bottomintegerBottom edge (px, exclusive).

rotate

FieldTypeDefaultDescription
degreesnumberrequiredClockwise rotation in degrees.
expandbooleantrueExpand canvas to avoid clipping corners.

grayscale

Boolean. true converts to grayscale.

blur

FieldTypeDefaultDescription
radiusinteger5Gaussian blur radius (1–99).

denoise

Non-local-means denoise, good for photos with sensor noise. Slow on large images.

FieldTypeDefaultDescription
strengthinteger10Denoise strength (1–50). Higher removes more noise but blurs detail.

threshold

Produces a pure black-and-white image.

FieldTypeDefaultDescription
valueinteger127Pixels above become white, below become black (0–255).
invertbooleanfalseInvert the result.

edge_detect

Canny edge detection: outputs white edges on black.

FieldTypeDefaultDescription
low_thresholdinteger100Lower hysteresis threshold (0–255).
high_thresholdinteger200Upper hysteresis threshold (0–255).

overlay

Paste another image (e.g. a logo) on top of the result. Useful for watermarks. Applied after filters, before text.

FieldTypeDefaultDescription
urlstringrequiredPre-signed GET URL of the overlay image. Transparent PNGs work best.
xinteger0Horizontal position of overlay top-left (px).
yinteger0Vertical position of overlay top-left (px).
opacitynumber1.0Overlay opacity (0.0–1.0).

text

Draw a text label on the image, optionally with a background box.

FieldTypeDefaultDescription
textstringrequiredText to draw.
xinteger10Horizontal position (px).
yinteger10Vertical position (px).
font_sizeinteger32Font size in pixels (6–400).
colorstringwhiteText color (CSS name or hex like #ff0000).
background_colorstringnoneIf set, a coloured box is drawn behind the text. CSS name or hex.
background_opacitynumber0.5Box opacity 0.0–1.0 (only used if background_color is set).
paddinginteger8Padding (px) around the text inside the box.

quality

Integer 1–100 (default 85). Only affects JPG and WebP output.

Inputs

NameTypeDefaultDescription
input_urlstringrequiredPre-signed GET URL of the source image.
output_formatstringpngOutput format: png, jpg, webp, gif, bmp, tiff.
output_filenamestringoutput.<ext>Filename in the download URL.
expires_ininteger3600Download URL TTL in seconds (60–86400).

Output

{
  "download_url": "https://…/output/…/output.webp",
  "key": "output/…",
  "size_bytes": 42150,
  "mime": "image/webp",
  "input_bytes": 204800,
  "input_dimensions": [1920, 1080],
  "expires_at": "2026-05-15T13:00:00Z"
}

Pricing

  • transform: 0.5 credits per megapixel of input. A 1920×1080 image is ~2.1 MP → 2 credits; a 300×300 thumbnail → 1 credit.
  • generate / generate_hq / edit: per-token, billed on the tokens each request consumes. generate_hq is the premium 4K tier; generate is the economical one.

Max input size for processing: 50 MB.