p-image-edit-text-aware

Same inputs as p-image-edit. Routes to p-image-edit when the input has no text, or nano banana when it does.

Overview

p-image-edit-text-aware detects text in the input images, then edits with p-image-edit (no text) or nano banana (text). Same request shape as p-image-edit. Unlisted: call it with Model: p-image-edit-text-aware.

Rate Limit: 500 requests per minute

Category: Image Editing

Pricing: billed from the completed run.

RoutingPrice
No text (has_text=false)$0.01 per output
Text detected (has_text=true)$0.03 per output

Quickstart

Upload an image

curl -X POST "https://api.pruna.ai/v1/files" \
  -H "apikey: YOUR_API_KEY" \
  -F "content=@/path/to/your/image.jpg"

Edit (asynchronous)

curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Model: p-image-edit-text-aware' \
  -d '{
    "input": {
      "prompt": "Change the background to a studio backdrop",
      "images": ["https://api.pruna.ai/v1/files/fqadqq42xq"],
      "aspect_ratio": "match_input_image"
    }
  }'

Synchronous request

curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Model: p-image-edit-text-aware' \
  -H 'Try-Sync: true' \
  -d '{
    "input": {
      "prompt": "Change the background to a studio backdrop",
      "images": ["https://api.pruna.ai/v1/files/fqadqq42xq"]
    }
  }'

Parameters

Required Parameters

ParameterTypeDescription
promptstringText instruction describing the desired edit
imagesarray of stringsImage URLs to edit. Provide the main image first

Optional Parameters

ParameterTypeDefaultDescription
aspect_ratiostring"match_input_image""match_input_image", "1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"
turbobooleantrueFaster run with extra optimizations; turn off for complicated edits
seedintegerrandomRandom seed for reproducible generation
disable_safety_checkerbooleanfalseDisable safety checker